using System;
using System.Collections.Generic;
using System.Text;

namespace AuthorizeNET {
	public class MerchantConfiguration : INameValueSerializable {

		private string merchant_account;
		private string transaction_key;
		private ResponseVersion response_version;
		private bool test_request;

		public MerchantConfiguration(string account, string key, ResponseVersion version, bool is_test) {
			this.merchant_account = account;
			this.response_version = version;
			this.test_request = is_test;
			this.transaction_key = key;
		}

		public MerchantConfiguration(string account, string key)
			: this(account, key, ResponseVersion.Version3_0, false) {

		}

		[KeyName("x_login")]
		public string Account {
			get { return (this.merchant_account); }
			set { this.merchant_account = value; }
		}

		[KeyName("x_tran_key")]
		public string TransactionKey {
			get { return (this.transaction_key); }
			set { this.transaction_key = value; }
		}

		[KeyName("x_version")]
		public ResponseVersion Version {
			get { return (this.response_version); }
			set { this.response_version = value; }
		}

		[KeyName("x_test_request")]
		public bool IsTestRequest {
			get { return (this.test_request); }
			set { this.test_request = value; }
		}
	}
}
